//FULLY CONVERTED...UNTESTED

using UnityEngine;

public class BuildReduce : Buff{

	public BuildReduce(int magnitude, int duration){
		this.magnitude = magnitude;
		this.duration = duration;
		this.debuff = true;
	}
	
	public void execute(Card card){
		for(int i=0; i<card.getActives().Count; i++){
			//Command c = card.getActives().get(i).type;
			if((card.getActives())[i].type is EffectActive.BuildLogicBlockCommand || (card.getActives())[i].type is EffectActive.BuildEthicsBlockCommand || (card.getActives())[i].type is EffectActive.BuildPassionBlockCommand || (card.getActives())[i].type is EffectActive.BuildDeceptionBlockCommand){
				(card.getActives())[i].magnitude -= (int)(card.getActives()[i].magnitude * (this.magnitude/100.0));
				Debug.Log((card.getActives())[i].magnitude);
			}
		}		
	}
}